﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace quanlysinhvien
{
    class student
    {
        private int ID;
        private string TEN;
        private string KHOA;
        private float DTB;
        //Constractor khong tham so
        public void sinhvien()
        {
            ID = 1;
            TEN = "Nguyen An";
            KHOA = "CNTT";
            DTB = 8;
        }
        // Constraction co tham so
        public void sinhvien(student sv)
        {
            ID = sv.ID;
            TEN = sv.TEN;
            KHOA = sv.KHOA;
            DTB = sv.DTB;
        }

        public void sinhvien(int id, string ten, string khoa, float dtb)
        {
            ID = id;
            TEN = ten;
            KHOA = khoa;
            DTB = dtb;
        }

        //Get Set du lieu
        public int IDSINHVIEN
        {
            get
            {
                return ID;
            }
            set
            {
                ID = value;
            }
        }

        public string TENSINHVIEN
        {
            get
            {
                return TEN;
            }
            set
            {
                TEN = value;
            }
        }

        public string KHOASINHVIEN
        {
            get 
            {
                return KHOA;
            }
            set 
            {
                KHOA = value;
            }
        }

        public float DTBSINHVIEN
        {
            get
            {
                return DTB;
            }
            set
            {
                DTB = value;
            }
        }

        //phuong thuc
        public void input()
        {
            Console.WriteLine("ma so sinh vien: {0}");
            ID = int.Parse(Console.ReadLine());
            Console.WriteLine("Ho va Ten: {0}");
            TEN = Console.ReadLine();
            Console.WriteLine("Khoa dang theo hoc: {0}");
            KHOA = Console.ReadLine();
            Console.WriteLine("Diem trung binh: {0}");
            DTB = float.Parse(Console.ReadLine());
        }
        public void showst()
        {
            Console.WriteLine("Ma so sinh vien: {0}" +ID);
            Console.WriteLine("Ho va Ten: {0}" +TEN);
            Console.WriteLine("Khoa: {0}" + KHOA);
            Console.WriteLine("Diem trung binh: {0}" + DTB);
        }

    }
}
